
# 树莓派上安装GrblHoming

### 1. Running Grbl Controller on Raspberry Pi
Grbl Controller 3.2 on Raspberry Pi

(Thanks to bobt on the Shapeoko forum for providing the basis for these steps)

Assuming you have the Raspberry Pi running in the GUI, open a command window (LXTerminal) and perform the following commands. Bob suggests a 8GB card, but this works on a 4GB fine – I started with about 40% SD card space in-use using the df command and ended up at about 60% use after I got it running. He is running the older 256MB, I am running the newer 512MB pi:

NOTE: All these steps in sequence may take close to two hours to complete due to the slow processor on the Pi.
``` bash
sudo apt-get update (required for AlaMode)
sudo apt-get install xrdp
sudo apt-get install arduino (required for AlaMode) [For normal Pi, this step is optional, but good to have. NOTE: I got an error that not all items could be downloaded. I tried to repeat command by adding a --fix-missing, i.e. sudo apt-get install --fix-missing arduino but it didn't help. UPDATE: The latest download as of May 2013 doesn't have this problem]
sudo apt-get install libudev-dev
sudo apt-get install qtcreator [This step takes quite awhile to complete. Note: I got an error downloading as in a previous step. If you get an error, repeat command but add a --fix-missing, i.e. sudo apt-get install --fix-missing qtcreator, in this case the --fix-missing worked.]
sudo apt-get install git
mkdir github
cd github
git clone https://github.com/zapmaker/GrblHoming
curl http://www.shapeoko.com/wiki/images/6/6a/Coaster.txt > Coaster.nc
cd GrblHoming
qmake GcodeSenderGUIthreads.pro
make
```
Make sure that you have your Grbl/Arduino plugged into the pi prior to running the last command:
./GrblController
Pick /dev/tty/USB0 as your port and click Open. The status window should report the Grbl version.
If you wish, you can connect to your Raspberry Pi via RDP from a Windows PC (or Mac):
Determine the pi’s IP, open a terminal window and type ifconfig
In the Windows PC, open Remote Desktop Connection and enter the IP that is associated with eth0 (or the wifi interface, if using that).
You should see a login screen that originates from the pi. Enter pi as the user and raspberry as the password.
This is not like VNC, which means you have separate sessions for each RDP connection in. If you are not running headless, you first need to close any GrblControllers that are running, such as on the monitor connected to the pi, then in the RDP window, open LXTerminal, go to the GrblHoming folder and type ./GrblController as noted above
To update your code with the latest version, open a terminal window to the existing GrblHoming folder and perform these commands:
```
git pull
qmake GcodeSenderGUIthreads.pro
(optionally perform a make clean)
make
```
then run as usual.

How to tell if you need to make clean? Usually sub-minor build number increments (i.e. 3.3.2->3.3.3) do not require make clean. But minor revs probably will. If in doubt, make clean. Compiler errors definitely mean do a make clean.

Possible Hookup Configuration
I’m using a Belkin F5U234 hub which is rated by elinux to support powering the Raspberry Pi and also provide USB hub capability.
 This is evident in the picture below where the hub is connected to the pi in two places.
  Check out this site:
